
package com.apes.scm.masterdata.car.model;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;


/**
 * 功能：车辆服务等级
 *
 * @Auther: linwz
 * @Date: 2018/7/23 14:09
 */

@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = CarServiceLevel.CONST_TABLE_NAME)
public class CarServiceLevel extends Model {
    public static final String CONST_TABLE_NAME = "mas_car_service_level";

    @Id
    @Column(name = "id", length = 60)
    @ApesGenerator(code = CONST_TABLE_NAME, name = "汽车服务等级编码")
    @Comment("编码")
    private String id;

    @Column(name = "name",length = 120, nullable = false)
    @Comment("车辆服务等级名称")
    private String name;//车辆服务等级名称

    @Column(name = "price_state")
    @Comment("价格区间起")
    private Integer priceState;//价格区间起

    @Column(name = "price_stop")
    @Comment("价格区间止")
    private Integer priceStop;//价格区间止

    @Column(name = "price_coefficient")
    @Comment("价格系数")
    private Double priceCoefficient;//价格系数

}

